﻿<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>前台首页</title>
    <!-- <link rel="stylesheet" href="/libs/layui/css/layui.css"> -->
    <link rel="stylesheet" type="text/css" href="/css/index.css">
    <script src="https://cdn.bootcdn.net/ajax/libs/art-template/4.13.2/lib/template-web.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>

<body>
    <div id="header">
        <img src="/images/logo1.png" alt="logo" />
        <ul>
            <li><a href="javascript:;" class="reg">会员注册</a>/</li>
            <li><a href="javascript:;" class="login">登陆</a></li>
        </ul>
    </div>
   
    <div id="nav">
        <ul>
            <!-- <li><a href="#" class="active">首页</a></li>
            <li><a href="">国内新闻</a></li> -->
        </ul>
    </div>

    <!-- 分类模板引擎 -->
    <script type="text/html" id="cates">
        <li><a href="/" class="active">首页</a></li>
        {{each cates v}}
        <li><a href="list.html?cate_id={{v.id}}">{{v.cate_name}}</a></li>
        {{/each}}
    </script>


    <div class="blank20"></div>

    <div id="main1">
        <div class="title">
            <h3>图片新闻</h3><a href="#">更多&gt;&gt;</a>
        </div>
        <ul>
            <!--  <li><a href="#"><img src="/images/infor.jpg" height="178" /></a>
                <p><a href="#">图片新闻</a></p>
            </li> -->
        </ul>
    </div>

    <!-- 图片新闻 -->
    <script type="text/html" id="img_news">
        {{each image_news as v}}
        <li><a href="detail.html?id={{v.id}}"><img src="{{v.img_url}}" width="158" height="178" /></a>
            <p><a href="detail.html?id={{v.id}}">{{v.title | len10}}</a></p>
        </li>
        {{/each}}
    </script>


    <div class="blank20"></div>

    <div class="news new_news">
        <!-- <div class="title">
            <h3>最新新闻</h3><a href="#">更多&gt;&gt;</a>
        </div> -->
        <!-- <ul>
            <li><span>2014-03</span> <a href="#">唐山大地震</a></li>
        </ul> -->
    </div>

    <!-- 最新新闻 -->
    <script type="text/html" id="new_news">
        <div class="title">
            <h3>最新新闻</h3><a href="#">更多&gt;&gt;</a>
        </div>
        <ul>
            {{each new_news v k}}
            {{ if (k%5==0 && k!=0) }}
        </ul>
        <ul>
            {{/if}}
            <li><span>{{v.createdAt|dateFormat}}</span> <a href="detail.html?id={{v.id}}">{{v.title|len10}}</a></li>
            {{/each}}
        </ul>
    </script>


    <div class="blank20"></div>

    <div class="news hot_news">
        <!-- <div class="title">
            <h3>最热新闻</h3><a href="#">更多&gt;&gt;</a>
        </div>
        <ul>
            <li><span>2014-03</span> <a href="#">唐山大地震</a></li>
            <li><span>2014-03</span> <a href="#">唐山大地震广告</a></li>
            <li><span>2014-03</span> <a href="#">唐山大地震不好过法国</a></li>
            <li><span>2014-03</span> <a href="#">唐山大地震</a></li>
            <li><span>2014-03</span> <a href="#">唐山大地震</a></li>
        </ul> -->
    </div>

    <!-- 最热新闻 -->
    <script type="text/html" id="hot_news">
        <div class="title">
            <h3>最热新闻</h3><a href="#">更多&gt;&gt;</a>
        </div>
        <ul>
            {{each hot_news v k}}
            {{ if (k%5==0 && k!=0) }}
        </ul>
        <ul>
            {{/if}}
            <li><span>{{v.createdAt|dateFormat}}</span> <a href="detail.html?id={{v.id}}">{{v.title|len10}}</a></li>
            {{/each}}
        </ul>
    </script>


    <div class="blank20"></div>
    <div id="footer">
        <p>版权所有&copy;上海快简教育<br />联系方式：18665455185</p>
    </div>

    <!-- 导入moment -->
    <script src="https://cdn.bootcdn.net/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
    <!-- 导入js文件 -->
    <script src="./js/ajax.js"></script>
    <script src="./js/index.js"></script>
    <script src="/libs/layui/layui.js"></script>
    <script src="./js/register.js"></script>
     <script src="./js/login.js"></script>

</body>

</html>